package com.light.sys.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.light.common.mybatisplus.MybatisPlusHelper;
import com.light.common.base.BaseServiceImpl;

import java.io.Serializable;
import java.util.List;

import com.light.sys.query.SysUserRoleQuery;
import com.light.sys.mapper.SysUserRoleMapper;
import com.light.sys.domain.SysUserRoleDO;
import com.light.sys.service.SysUserRoleService;



@Service
public class SysUserRoleServiceImpl extends BaseServiceImpl<SysUserRoleDO, SysUserRoleMapper> implements SysUserRoleService {
	@Autowired
	private SysUserRoleMapper sysUserRoleMapper;
	
	@Override
	public List<SysUserRoleDO> data(SysUserRoleQuery sysUserRoleQuery){
		QueryWrapper<SysUserRoleDO> queryWrapper = MybatisPlusHelper.setQueryWrapperPageParam(sysUserRoleQuery.createQueryWrapper(),sysUserRoleQuery);
		return sysUserRoleMapper.selectList(queryWrapper);
	}
	
	@Override
	public int count(SysUserRoleQuery sysUserRoleQuery){
		return sysUserRoleMapper.selectCount(sysUserRoleQuery.createQueryWrapper());
	}
	
}
